package com.yaorange.nongjt.service.impl;

import java.util.List;
import com.yaorange.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yaorange.nongjt.mapper.NjtUserPerfectMapper;
import com.yaorange.nongjt.domain.NjtUserPerfect;
import com.yaorange.nongjt.service.INjtUserPerfectService;

/**
 * 用户完善信息Service业务层处理
 * 
 * @author yrw
 * @date 2025-02-27
 */
@Service
public class NjtUserPerfectServiceImpl implements INjtUserPerfectService 
{
    @Autowired
    private NjtUserPerfectMapper njtUserPerfectMapper;

    /**
     * 查询用户完善信息
     * 
     * @param id 用户完善信息主键
     * @return 用户完善信息
     */
    @Override
    public NjtUserPerfect selectNjtUserPerfectById(Long id)
    {
        return njtUserPerfectMapper.selectNjtUserPerfectById(id);
    }

    /**
     * 查询用户完善信息列表
     * 
     * @param njtUserPerfect 用户完善信息
     * @return 用户完善信息
     */
    @Override
    public List<NjtUserPerfect> selectNjtUserPerfectList(NjtUserPerfect njtUserPerfect)
    {
        return njtUserPerfectMapper.selectNjtUserPerfectList(njtUserPerfect);
    }

    /**
     * 新增用户完善信息
     * 
     * @param njtUserPerfect 用户完善信息
     * @return 结果
     */
    @Override
    public int insertNjtUserPerfect(NjtUserPerfect njtUserPerfect)
    {
        njtUserPerfect.setCreateTime(DateUtils.getNowDate());
        return njtUserPerfectMapper.insertNjtUserPerfect(njtUserPerfect);
    }

    /**
     * 修改用户完善信息
     * 
     * @param njtUserPerfect 用户完善信息
     * @return 结果
     */
    @Override
    public int updateNjtUserPerfect(NjtUserPerfect njtUserPerfect)
    {
        njtUserPerfect.setUpdateTime(DateUtils.getNowDate());
        return njtUserPerfectMapper.updateNjtUserPerfect(njtUserPerfect);
    }

    /**
     * 批量删除用户完善信息
     * 
     * @param ids 需要删除的用户完善信息主键
     * @return 结果
     */
    @Override
    public int deleteNjtUserPerfectByIds(Long[] ids)
    {
        return njtUserPerfectMapper.deleteNjtUserPerfectByIds(ids);
    }

    /**
     * 删除用户完善信息信息
     * 
     * @param id 用户完善信息主键
     * @return 结果
     */
    @Override
    public int deleteNjtUserPerfectById(Long id)
    {
        return njtUserPerfectMapper.deleteNjtUserPerfectById(id);
    }
}
